# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=openrgb
pkgver=0.3
pkgrel=0
pkgdesc="Open source RGB lighting control that doesn't depend on manufacturer software"
url="https://gitlab.com/CalcProgrammer1/OpenRGB"
arch="all !ppc64le" # Build fails and not supported on ppc64le
license="GPL-2.0-only"
makedepends="qt5-qtbase-dev libusb-dev hidapi-dev"
source="https://gitlab.com/CalcProgrammer1/OpenRGB/-/archive/release_$pkgver/OpenRGB-release_$pkgver.tar.gz
	modules-load.conf
	"
install="$pkgname.post-install"
builddir="$srcdir/OpenRGB-release_$pkgver"

build() {
	qmake-qt5 PREFIX=/usr
	make
}

check() {
	make check
}

package() {
	INSTALL_ROOT="$pkgdir" make install

	install -Dm644 "$srcdir"/modules-load.conf "$pkgdir"/usr/lib/modules-load.d/openrgb.conf
	install -Dm644 60-openrgb.rules -t "$pkgdir"/usr/lib/udev/rules.d
}

sha512sums="6d8a26f4c1b6eb63b59ed64e552ee49c37a4d04343bdf87d27f591fbf0da1634657a3314f1e02c40a0935b7757690bd22999be9026bdea053af21ac79f1a2504  OpenRGB-release_0.3.tar.gz
6fc01a649fcdecd2168292ae383a5af61be8c3d3fb8b98026a779f09dc9c9e1643e3c55290abd3b262bfea55e9a6cacab902f0fae5c9396dc20028a37f566555  modules-load.conf"
